#include<bits/stdc++.h>
using namespace std;
#define OK 1
#define ERROR 0
typedef int Status;
typedef int ElemType; 
typedef struct LNode{
	ElemType data;
	struct LNode *next;	
}LNode, *LinkList;

Status Init(LinkList &L)
{
	L = new LNode;
	if(!L) return ERROR;
	L->next = NULL;
	return OK;
}
Status Create(LinkList &L, int n)
{
	LNode *t = L;
	for(int i = 0; i < n; i ++)
	{
		LNode *p = new LNode;
		if(!p) return ERROR;
		cin >> p->data;
		p->next = t->next;
		t->next = p;
		t = p;
	}
	t->next = NULL;
	return OK;
}
int Search_k(LinkList L, int k)
{
	/**********Begin****************/
    int length = 0;
	LNode *p = L;
	while(p->next) 
	{
		p = p->next;
		length++;
	}
	p = L;
	int i = 0;
	if(k > 0 && k <= length)
	{
		while(p->next && i <= length - k)
		{
			p = p->next;
			i++;
		}
		cout << p->data << endl;
	}
	else return 0;
	return 1;
    /***********End***************/
}
void Show(LinkList L)
{
	LNode *p = L->next;
	while(p)
	{
		cout << p->data << ' ';
		p = p->next;
	}
	cout << endl;
}
int main()
{
	LinkList L;
	Init(L);
	
	int n, k;
	cin >> n >> k;
	
	Create(L, n);
	int flag = Search_k(L, k);
	if(flag) cout << "查找成功" << endl;
	else cout << "查找失败" << endl;
	 
	return 0;
}